from types import MethodType, CellType

class A:
    def __init__(self, *args, **kwargs) -> None:
        pass

def show(self):
    print('OK')

a = A()

a.show = MethodType(show, a)
setattr(a, 'name', 'xiaoming')
setattr(a, 'age', '100')

a.show()
print(a.name)
print(getattr(a, 'age'))

# import builtins, pprint
# pprint.pprint(dir(builtins))
